﻿using Model.Request;
using Model.Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterfaceService
{
    public interface IMenuService
    {
        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="req"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<bool> Add(MenuAdd req, string userId);

        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="req"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<bool> Edit(MenuEdit req, string userId);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> Del(string id);

        /// <summary>
        /// 批量删除菜单
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<bool> BatchDel(string ids);

        /// <summary>
        /// 获取带权限的菜单列表（什么角色就看什么菜单）
        /// </summary>
        /// <param name="req"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<MenuRes>> GetMenus(MenuReq req, string userId);
        
        /// <summary>
        /// 设置菜单
        /// </summary>
        /// <param name="roleId">角色主键</param>
        /// <param name="MenuId">菜单主键</param>
        /// <returns></returns>
        Task<bool> SettingMenu(string roleId, string MenuId);
    }
}
